package com.ailink.design.principle.liskov;

/**
 * Created by Administrator on 2018/9/19
 */
public class Square extends Rectangle {

    private int side;

    public int getSide() {
        return side;
    }

    public void setSide(int side) {
        this.side = side;
    }

    @Override
    public int getLength() {
        return getSide();
    }

    @Override
    public void setLength(int length) {
        setSide(length);
    }

    @Override
    public int getWidth() {
        return getSide();
    }

    @Override
    public void setWidth(int width) {
       setSide(width);
    }
}
